package com.xindacloud.sms.console.system.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xindacloud.sms.console.result.Result;
import com.xindacloud.sms.console.system.dto.SmsReceiveEmailSettingDTO;
import com.xindacloud.sms.console.system.entity.SmsReceiveEmailSetting;
import com.xindacloud.sms.console.system.service.ISmsReceiveEmailSettingService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author czc
 * @since 2019-10-15
 */
@Api(tags = {"接收邮箱设置模块"})
@RestController
@RequestMapping("/api/v1/sms-receive-email-setting")
public class SmsReceiveEmailSettingController {
	
	@Autowired
	private ISmsReceiveEmailSettingService smsReceiveEmailSettingService;
	
	@ApiOperation(value = "接收邮箱列表",response=SmsReceiveEmailSetting.class)
	@PostMapping(value = "/getSmsReceiveEmailSettingList")
	public Result getSmsReceiveEmailSettingList(@RequestBody SmsReceiveEmailSettingDTO smsReceiveEmailSettingDTO) {
	    return smsReceiveEmailSettingService.getSmsReceiveEmailSettingList(smsReceiveEmailSettingDTO);
	}
	
	@ApiOperation(value = "保存或修改网站邮箱配置")
	@PostMapping(value = "/saveOrUpdateSmsWebsiteInfo")
	public Result saveOrUpdateSmsReceiveEmailSetting(@RequestBody SmsReceiveEmailSetting smsReceiveEmailSetting) {
	    return smsReceiveEmailSettingService.saveOrUpdateSmsReceiveEmailSetting(smsReceiveEmailSetting);
	}


}
